<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang xml:lang>
<head>
  <meta http-equiv='X-UA-Compatible' content='IE=edge' />
  <meta http-equiv='MSThemeCompatible' content='Yes'>

  <meta charset="utf-8" />
  <meta name="generator" content="pandoc" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
  <title>CCDAudio Class</title>
  <style type="text/css">
      code{white-space: pre-wrap;}
      span.smallcaps{font-variant: small-caps;}
      span.underline{text-decoration: underline;}
      div.column{display: inline-block; vertical-align: top; width: 50%;}
  </style>
  <style type="text/css">@font-face {font-family: octicons-link;src: url(data:font/woff;charset=utf-8;base64,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) format('woff');}body {-webkit-text-size-adjust: 100%;text-size-adjust: 100%;color: #333;font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size: 16px;line-height: 1.6;word-wrap: break-word;max-width: 99%;box-sizing: border-box;padding: 20px 5px 8rem 5px; margin-left: auto;margin-right: auto;}body a {background-color: transparent;}body a:active,body a:hover {outline: 0;}body strong {font-weight: bold;}body h1 {font-size: 2em;margin: 0.67em 0;}body img {border: 0;}body hr {box-sizing: content-box;height: 0;}body pre {overflow: auto;}body code,body kbd,body pre {font-family: monospace, monospace;font-size: 1em;}body input {color: inherit;font: inherit;margin: 0;}body html input[disabled] {cursor: default;}body input {line-height: normal;}body input[type="checkbox"] {box-sizing: border-box;padding: 0;}body table {border-collapse: collapse;border-spacing: 0;}body td,body th {padding: 0;}body * {box-sizing: border-box;}body input {font: 13px / 1.4 Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";}body a {color: #4078c0;text-decoration: none;}body a:hover,body a:active {text-decoration: underline;}body hr {height: 0;margin: 15px 0;overflow: hidden;background: transparent;border: 0;border-bottom: 1px solid #ddd;}body hr:before {display: table;content: "";}body hr:after {display: table;clear: both;content: "";}body h1,body h2,body h3,body h4,body h5,body h6 {margin-top: 15px;margin-bottom: 15px;line-height: 1.1;}body h1 {font-size: 30px;}body h2 {font-size: 21px;}body h3 {font-size: 16px;}body h4 {font-size: 14px;}body h5 {font-size: 12px;}body h6 {font-size: 11px;}body blockquote {margin: 0;}body ul,body ol {padding: 0;margin-top: 0;margin-bottom: 0;}body ol ol,body ul ol {list-style-type: lower-roman;}body ul ul ol,body ul ol ol,body ol ul ol,body ol ol ol {list-style-type: lower-alpha;}body dd {margin-left: 0;}body code {font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;font-size: 12px;}body pre {margin-top: 0;margin-bottom: 0;font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;}body .select::-ms-expand {opacity: 0;}body .octicon {font: normal normal normal 16px/1 octicons-link;display: inline-block;text-decoration: none;text-rendering: auto;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;}body .octicon-link:before {content: '\f05c';}body:before {display: table;content: "";}body:after {display: table;clear: both;content: "";}body>*:first-child {margin-top: 0 !important;}body>*:last-child {margin-bottom: 0 !important;}body a:not([href]) {color: inherit;text-decoration: none;}body .anchor {display: inline-block;padding-right: 2px;margin-left: -18px;}body .anchor:focus {outline: none;}body h1,body h2,body h3,body h4,body h5,body h6 {margin-top: 1em;margin-bottom: 16px;font-weight: bold;line-height: 1.4;}body h1 .octicon-link,body h2 .octicon-link,body h3 .octicon-link,body h4 .octicon-link,body h5 .octicon-link,body h6 .octicon-link {color: #000;vertical-align: middle;visibility: hidden;}body h1:hover .anchor,body h2:hover .anchor,body h3:hover .anchor,body h4:hover .anchor,body h5:hover .anchor,body h6:hover .anchor {text-decoration: none;}body h1:hover .anchor .octicon-link,body h2:hover .anchor .octicon-link,body h3:hover .anchor .octicon-link,body h4:hover .anchor .octicon-link,body h5:hover .anchor .octicon-link,body h6:hover .anchor .octicon-link {visibility: visible;}body h1 {padding-bottom: 0.3em;font-size: 1.75em;line-height: 1.2;}body h1 .anchor {line-height: 1;}body h2 {padding-bottom: 0.3em;font-size: 1.5em;line-height: 1.225;}body h2 .anchor {line-height: 1;}body h3 {font-size: 1.25em;line-height: 1.43;}body h3 .anchor {line-height: 1.2;}body h4 {font-size: 1em;}body h4 .anchor {line-height: 1.2;}body h5 {font-size: 1em;}body h5 .anchor {line-height: 1.1;}body h6 {font-size: 1em;color: #777;}body h6 .anchor {line-height: 1.1;}body p,body blockquote,body ul,body ol,body dl,body table,body pre {margin-top: 0;margin-bottom: 16px;}body hr {height: 4px;padding: 0;margin: 16px 0;background-color: #e7e7e7;border: 0 none;}body ul,body ol {padding-left: 2em;}body ul ul,body ul ol,body ol ol,body ol ul {margin-top: 0;margin-bottom: 0;}body li>p {margin-top: 16px;}body dl {padding: 0;}body dl dt {padding: 0;margin-top: 16px;font-size: 1em;font-style: italic;font-weight: bold;}body dl dd {padding: 0 16px;margin-bottom: 16px;}body blockquote {padding: 0 15px;color: #777;border-left: 4px solid #ddd;}body blockquote>:first-child {margin-top: 0;}body blockquote>:last-child {margin-bottom: 0;}body table {display: block;width: 100%;overflow: auto;word-break: normal;word-break: keep-all;}body table th {font-weight: bold;}body table th,body table td {padding: 6px 13px;border: 1px solid #ddd;}body table tr {background-color: #fff;border-top: 1px solid #ccc;}body table tr:nth-child(2n) {background-color: #f8f8f8;}body img {max-width: 100%;box-sizing: content-box;background-color: #fff;}body code {padding: 0;padding-top: 0;padding-bottom: 0;margin: 0;font-size: 85%;background-color: rgba(0,0,0,0.04);border-radius: 3px;}body code:before,body code:after {letter-spacing: -0.2em;content: "\00a0";}body pre>code {padding: 0;margin: 0;font-size: 100%;word-break: normal;white-space: pre;background: transparent;border: 0;}body .highlight {margin-bottom: 16px;}body .highlight pre,body pre {padding: 16px;overflow: auto;font-size: 85%;line-height: 1.45;background-color: #f7f7f7;border-radius: 3px;}body .highlight pre {margin-bottom: 0;word-break: normal;}body pre {word-wrap: normal;}body pre code {display: inline;max-width: initial;padding: 0;margin: 0;overflow: initial;line-height: inherit;word-wrap: normal;background-color: transparent;border: 0;}body pre code:before,body pre code:after {content: normal;}body kbd {display: inline-block;padding: 3px 5px;font-size: 11px;line-height: 10px;color: #555;vertical-align: middle;background-color: #fcfcfc;border: solid 1px #ccc;border-bottom-color: #bbb;border-radius: 3px;box-shadow: inset 0 -1px 0 #bbb;}body .pl-c {color: #969896;}body .pl-c1,body .pl-s .pl-v {color: #0086b3;}body .pl-e,body .pl-en {color: #795da3;}body .pl-s .pl-s1,body .pl-smi {color: #333;}body .pl-ent {color: #63a35c;}body .pl-k {color: #a71d5d;}body .pl-pds,body .pl-s,body .pl-s .pl-pse .pl-s1,body .pl-sr,body .pl-sr .pl-cce,body .pl-sr .pl-sra,body .pl-sr .pl-sre {color: #183691;}body .pl-v {color: #ed6a43;}body .pl-id {color: #b52a1d;}body .pl-ii {background-color: #b52a1d;color: #f8f8f8;}body .pl-sr .pl-cce {color: #63a35c;font-weight: bold;}body .pl-ml {color: #693a17;}body .pl-mh,body .pl-mh .pl-en,body .pl-ms {color: #1d3e81;font-weight: bold;}body .pl-mq {color: #008080;}body .pl-mi {color: #333;font-style: italic;}body .pl-mb {color: #333;font-weight: bold;}body .pl-md {background-color: #ffecec;color: #bd2c00;}body .pl-mi1 {background-color: #eaffea;color: #55a532;}body .pl-mdr {color: #795da3;font-weight: bold;}body .pl-mo {color: #1d3e81;}body kbd {display: inline-block;padding: 3px 5px;font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;line-height: 10px;color: #555;vertical-align: middle;background-color: #fcfcfc;border: solid 1px #ccc;border-bottom-color: #bbb;border-radius: 3px;box-shadow: inset 0 -1px 0 #bbb;}body .task-list-item {list-style-type: none;}body .task-list-item+.task-list-item {margin-top: 3px;}body .task-list-item input {margin: 0 0.35em 0.25em -1.6em;vertical-align: middle;}body :checked+.radio-label {z-index: 1;position: relative;border-color: #4078c0;}</style>
  
    
  
</head>
<body>
<h1 id="ccdaudio-class">CCDAudio Class</h1>
<p>The <strong>CCDAudio</strong> class allows to play a CD Rom using MCI.</p>
<h3 id="constructor">Constructor</h3>
<table>
<thead>
<tr class="header">
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><a href="#Constructor">Constructor</a></td>
<td>Creates an instance of the <strong>CCDAudio</strong> class.</td>
</tr>
</tbody>
</table>
<h3 id="methods">Methods</h3>
<table>
<thead>
<tr class="header">
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><a href="#Backward">Backward</a></td>
<td>Moves to the previous track.</td>
</tr>
<tr class="even">
<td><a href="#Close">Close</a></td>
<td>Closes the device or file and any associated resources. MCI unloads a device when all instances of the device or all files are closed.</td>
</tr>
<tr class="odd">
<td><a href="#CloseDoor">CloseDoor</a></td>
<td>Closes the CDRom door.</td>
</tr>
<tr class="even">
<td><a href="#Forward">Forward</a></td>
<td>Moves to the next track.</td>
</tr>
<tr class="odd">
<td><a href="#GetAllTracksLength">GetAllTracksLength</a></td>
<td>Returns the total length in seconds of all the tracks.</td>
</tr>
<tr class="even">
<td><a href="#GetAllTracksLengthString">GetAllTracksLengthString</a></td>
<td>Returns the total length of all the tracks.</td>
</tr>
<tr class="odd">
<td><a href="#GetCurrentPos">GetCurrentPos</a></td>
<td>Returns the current track position in seconds.</td>
</tr>
<tr class="even">
<td><a href="#GetCurrentPosString">GetCurrentPosString</a></td>
<td>Returns the current track position.</td>
</tr>
<tr class="odd">
<td><a href="#GetCurrentTrack">GetCurrentTrack</a></td>
<td>Returns the current track number.</td>
</tr>
<tr class="even">
<td><a href="#GetErrorString">GetErrorString</a></td>
<td>Retrieves a string that describes the specified MCI error code.</td>
</tr>
<tr class="odd">
<td><a href="#GetLastError">GetLastError</a></td>
<td>Retrieves a The last MCI error code.</td>
</tr>
<tr class="even">
<td><a href="#GetTrackLength">GetTrackLength</a></td>
<td>Returns the length in seconds of the given track.</td>
</tr>
<tr class="odd">
<td><a href="#GetTrackLengthString">GetTrackLengthString</a></td>
<td>Returns the length of the given track.</td>
</tr>
<tr class="even">
<td><a href="#GetTracksCount">GetTracksCount</a></td>
<td>Returns the count of tracks.</td>
</tr>
<tr class="odd">
<td><a href="#GetTrackStartTime">GetTrackStartTime</a></td>
<td>Returns the start time of the given track.</td>
</tr>
<tr class="even">
<td><a href="#GetTrackStartTimeString">GetTrackStartTimeString</a></td>
<td>Returns the start time of the given track.</td>
</tr>
<tr class="odd">
<td><a href="#IsMediaInserted">IsMediaInserted</a></td>
<td>Checks whether CD media is inserted.</td>
</tr>
<tr class="even">
<td><a href="#IsPaused">IsPaused</a></td>
<td>Checks whether is in paused mode.</td>
</tr>
<tr class="odd">
<td><a href="#IsPlaying">IsPlaying</a></td>
<td>Checks whether is in play mode.</td>
</tr>
<tr class="even">
<td><a href="#IsReady">IsReady</a></td>
<td>Checks if the device is ready.</td>
</tr>
<tr class="odd">
<td><a href="#IsSeeking">IsSeeking</a></td>
<td>Checks whether is in seeking mode.</td>
</tr>
<tr class="even">
<td><a href="#IsStopped">IsStopped</a></td>
<td>Checks whether is in stopped mode.</td>
</tr>
<tr class="odd">
<td><a href="#Open">Open</a></td>
<td>Initializes the device.</td>
</tr>
<tr class="even">
<td><a href="#OpenDoor">OpenDoor</a></td>
<td>Opens the CDRom door.</td>
</tr>
<tr class="odd">
<td><a href="#Pause">Pause</a></td>
<td>Pauses playing CD Audio.</td>
</tr>
<tr class="even">
<td><a href="#Play">Play</a></td>
<td>Starts playing CD Audio.</td>
</tr>
<tr class="odd">
<td><a href="#PlayFrom">PlayFrom</a></td>
<td>Starts playing CD Audio on the given track.</td>
</tr>
<tr class="even">
<td><a href="#PlayFromTo">PlayFromTo</a></td>
<td>Starts playing CD Audio from a given track to a given track.</td>
</tr>
<tr class="odd">
<td><a href="#Stop">Stop</a></td>
<td>Stops playing CD Audio.</td>
</tr>
<tr class="even">
<td><a href="#ToEnd">ToEnd</a></td>
<td>Sets the position to the end of the audio CD.</td>
</tr>
<tr class="odd">
<td><a href="#ToStart">ToStart</a></td>
<td>Sets the position to the start of the audio CD.</td>
</tr>
</tbody>
</table>
<h1 id="constructor-1"><a name="Constructor"></a>Constructor</h1>
<p>Creates an instance of the <strong>CCDAudio</strong> class.</p>
<pre><code>CONSTRUCTOR CCDAudio
</code></pre>
<h4 id="usage-example:">Usage example:</h4>
<pre><code>DIM pAudio AS CCDAudio
pAudio.Open
pAudio.Play
</code></pre>
<h1 id="backward"><a name="Backward"></a>Backward</h1>
<p>Moves to the previous track.</p>
<pre><code>FUNCTION Backward () AS BOOLEAN
</code></pre>
<h4 id="return-value">Return value</h4>
<p>TRUE or FALSE.</p>
<h1 id="close"><a name="Close"></a>Close</h1>
<p>Closes the device or file and any associated resources. MCI unloads a device when all instances of the device or all files are closed.</p>
<pre><code>FUNCTION Close () AS MCIERROR
</code></pre>
<h4 id="return-value-1">Return value</h4>
<p>Returns zero if successful or an error otherwise.</p>
<h1 id="closedoor"><a name="CloseDoor"></a>CloseDoor</h1>
<p>Closes the CDRom door.</p>
<pre><code>FUNCTION CloseDoor () AS MCIERROR
</code></pre>
<h4 id="return-value-2">Return value</h4>
<p>Returns zero if successful or an error otherwise.</p>
<h1 id="forward"><a name="Forward"></a>Forward</h1>
<p>Moves to the next track.</p>
<pre><code>FUNCTION Forward () AS BOOLEAN
</code></pre>
<h4 id="return-value-3">Return value</h4>
<p>TRUE or FALSE.</p>
<h1 id="getalltrackslength"><a name="GetAllTracksLength"></a>GetAllTracksLength</h1>
<p>Returns the total length in seconds of all the tracks.</p>
<pre><code>FUNCTION GetAllTracksLength () AS LONG
</code></pre>
<h1 id="getalltrackslengthstring"><a name="GetAllTracksLengthString"></a>GetAllTracksLengthString</h1>
<p>Returns the total length of all the tracks as a string.</p>
<pre><code>FUNCTION GetAllTracksLengthString () AS CWSTR
</code></pre>
<h1 id="getcurrentpos"><a name="GetCurrentPos"></a>GetCurrentPos</h1>
<p>Returns the current track position in seconds.</p>
<pre><code>FUNCTION GetCurrentPos () AS LONG
</code></pre>
<h1 id="getcurrentposstring"><a name="GetCurrentPosString"></a>GetCurrentPosString</h1>
<p>Returns the current track position as a string.</p>
<pre><code>FUNCTION GetCurrentPosString () AS CWSTR
</code></pre>
<h1 id="getcurrenttrack"><a name="GetCurrentTrack"></a>GetCurrentTrack</h1>
<p>Returns the current track number.</p>
<pre><code>FUNCTION GetCurrentTrack () AS LONG
</code></pre>
<h1 id="geterrorstring"><a name="GetErrorString"></a>GetErrorString</h1>
<p>Retrieves a string that describes the specified MCI error code.</p>
<pre><code>FUNCTION GetErrorString (BYVAL dwError AS MCIERROR = 0) AS CWSTR
</code></pre>
<table>
<thead>
<tr class="header">
<th>Parameter</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><em>dwError</em></td>
<td>Optional. The MCI error code. If this parameter is omitted, the last error code is used.</td>
</tr>
</tbody>
</table>
<h1 id="getlasterror"><a name="GetLastError"></a>GetLastError</h1>
<p>Returns the last MCI error code.</p>
<pre><code>FUNCTION GetLastError () AS MCIERROR
</code></pre>
<h1 id="gettracklength"><a name="GetTrackLength"></a>GetTrackLength</h1>
<p>Returns the length in seconds of the given track.</p>
<pre><code>FUNCTION GetTrackLength (BYVAL nTrack AS LONG) AS LONG
</code></pre>
<table>
<thead>
<tr class="header">
<th>Parameter</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><em>nTrack</em></td>
<td>The track number.</td>
</tr>
</tbody>
</table>
<h1 id="gettracklengthstring"><a name="GetTrackLengthString"></a>GetTrackLengthString</h1>
<p>Returns the length of the given track as a string.</p>
<pre><code>FUNCTION GetTrackLengthString (BYVAL nTrack AS LONG) AS CWSTR
</code></pre>
<table>
<thead>
<tr class="header">
<th>Parameter</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><em>nTrack</em></td>
<td>The track number.</td>
</tr>
</tbody>
</table>
<h1 id="gettrackscount"><a name="GetTracksCount"></a>GetTracksCount</h1>
<p>Returns the count of tracks.</p>
<pre><code>FUNCTION GetTracksCount () AS LONG
</code></pre>
<h1 id="gettrackstarttime"><a name="GetTrackStartTime"></a>GetTrackStartTime</h1>
<p>Returns the start time of the given track.</p>
<pre><code>FUNCTION GetTrackStartTime (BYVAL nTrack AS LONG) AS LONG
</code></pre>
<table>
<thead>
<tr class="header">
<th>Parameter</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><em>nTrack</em></td>
<td>The track number.</td>
</tr>
</tbody>
</table>
<h1 id="gettrackstarttimestring"><a name="GetTrackStartTimeString"></a>GetTrackStartTimeString</h1>
<p>Returns the start time of the given track as a string.</p>
<pre><code>FUNCTION GetTrackStartTimeString (BYVAL nTrack AS LONG) AS CWSTR
</code></pre>
<table>
<thead>
<tr class="header">
<th>Parameter</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><em>nTrack</em></td>
<td>The track number.</td>
</tr>
</tbody>
</table>
<h1 id="ismediainserted"><a name="IsMediaInserted"></a>IsMediaInserted</h1>
<p>Checks whether CD media is inserted.</p>
<pre><code>FUNCTION IsMediaInserted () AS BOOLEAN
</code></pre>
<h4 id="return-value-4">Return value</h4>
<p>TRUE or FALSE.</p>
<h1 id="ispaused"><a name="IsPaused"></a>IsPaused</h1>
<p>Checks whether is in paused mode.</p>
<pre><code>FUNCTION IsPaused () AS BOOLEAN
</code></pre>
<h4 id="return-value-5">Return value</h4>
<p>TRUE or FALSE.</p>
<h1 id="isplaying"><a name="IsPlaying"></a>IsPlaying</h1>
<p>Checks whether is in play mode.</p>
<pre><code>FUNCTION IsPlaying () AS BOOLEAN
</code></pre>
<h4 id="return-value-6">Return value</h4>
<p>TRUE or FALSE.</p>
<h1 id="isready"><a name="IsReady"></a>IsReady</h1>
<p>Checks if the device is ready.</p>
<pre><code>FUNCTION IsReady () AS BOOLEAN
</code></pre>
<h4 id="return-value-7">Return value</h4>
<p>TRUE or FALSE.</p>
<h1 id="isseeking"><a name="IsSeeking"></a>IsSeeking</h1>
<p>Checks whether is in seeking mode.</p>
<pre><code>FUNCTION IsSeeking () AS BOOLEAN
</code></pre>
<h4 id="return-value-8">Return value</h4>
<p>TRUE or FALSE.</p>
<h1 id="isstopped"><a name="IsStopped"></a>IsStopped</h1>
<p>Checks whether is in stopped mode.</p>
<pre><code>FUNCTION IsStopped () AS BOOLEAN
</code></pre>
<h4 id="return-value-9">Return value</h4>
<p>TRUE or FALSE.</p>
<h1 id="open"><a name="Open"></a>Open</h1>
<p>Initializes the device.</p>
<pre><code>FUNCTION Open () AS DWORD
</code></pre>
<h4 id="return-value-10">Return value</h4>
<p>Returns zero if successful or an error otherwise.</p>
<h1 id="opendoor"><a name="OpenDoor"></a>OpenDoor</h1>
<p>Opens the CDRom door.</p>
<pre><code>FUNCTION OpenDoor () AS MCIERROR
</code></pre>
<h4 id="return-value-11">Return value</h4>
<p>Returns zero if successful or an error otherwise.</p>
<h1 id="pause"><a name="Pause"></a>Pause</h1>
<p>Pauses playing CD Audio.</p>
<pre><code>FUNCTION Pause () AS MCIERROR
</code></pre>
<h4 id="return-value-12">Return value</h4>
<p>Returns zero if successful or an error otherwise.</p>
<h1 id="play"><a name="Play"></a>Play</h1>
<p>Starts playing CD Audio.</p>
<pre><code>FUNCTION Play () AS MCIERROR
</code></pre>
<h4 id="return-value-13">Return value</h4>
<p>Returns zero if successful or an error otherwise.</p>
<h1 id="playfrom"><a name="PlayFrom"></a>PlayFrom</h1>
<p>Starts playing CD Audio on the given track.</p>
<pre><code>FUNCTION PlayFrom (BYVAL nTrack AS LONG) AS MCIERROR
</code></pre>
<table>
<thead>
<tr class="header">
<th>Parameter</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><em>nTrack</em></td>
<td>The track number.</td>
</tr>
</tbody>
</table>
<h4 id="return-value-14">Return value</h4>
<p>Returns zero if successful or an error otherwise.</p>
<h1 id="playfromto"><a name="PlayFromTo"></a>PlayFromTo</h1>
<p>Starts playing CD Audio from a given track to a given track.</p>
<pre><code>FUNCTION PlayFromTo (BYVAL nStartTrack AS LONG, BYVAL nEndTrack AS LONG) AS MCIERROR
</code></pre>
<table>
<thead>
<tr class="header">
<th>Parameter</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><em>nStartTrack</em></td>
<td>The starting track number.</td>
</tr>
<tr class="even">
<td><em>nEndTrack</em></td>
<td>The ending track number.</td>
</tr>
</tbody>
</table>
<h4 id="return-value-15">Return value</h4>
<p>Returns zero if successful or an error otherwise.</p>
<h1 id="stop"><a name="Stop"></a>Stop</h1>
<p>Stops playing CD Audio.</p>
<pre><code>FUNCTION Stop () AS MCIERROR
</code></pre>
<h1 id="toend"><a name="ToEnd"></a>ToEnd</h1>
<p>Sets the position to the end of the audio CD.</p>
<pre><code>FUNCTION ToEnd () AS MCIERROR
</code></pre>
<h1 id="tostart"><a name="ToStart"></a>ToStart</h1>
<p>Sets the position to the start of the audio CD.</p>
<pre><code>FUNCTION ToStart () AS MCIERROR
</code></pre>
</body>
</html>

